//
//  ParLeaveCountView.m
//  ChatDemo-UI2.0
//
//  Created by zz on 17/2/20.
//  Copyright © 2017年 zz. All rights reserved.
//

#import "ParLeaveCountView.h"

@implementation ParLeaveCountView

- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        
        CGFloat dotY = (self.frame.size.height - 5) / 2;
        _dotView = [[UIView alloc] initWithFrame:CGRectMake(0, dotY, 5, 5)];
        
        _dotView.backgroundColor = [UIColor colorWithHexString:@"#fed516"];
        _dotView.layer.cornerRadius = 2.5f;
        [self addSubview:_dotView];
        
        CGFloat x = CGRectGetMaxX(_dotView.frame) + 8;
        
        _desLabel = [[UILabel alloc] initWithFrame:CGRectMake(x, 0, 56, 16)];
        _desLabel.font = [UIFont systemFontOfSize:15];
        _desLabel.textColor = [UIColor colorWithHexString:@"#3b3b3b"];
        [self addSubview:_desLabel];
        
        x = CGRectGetMaxX(_desLabel.frame) + 5;
        _countLabel = [[UILabel alloc] initWithFrame:CGRectMake(x, 0, 100, 16)];
        _countLabel.font = [UIFont systemFontOfSize:15];
        _countLabel.textAlignment = NSTextAlignmentLeft;
        _countLabel.textColor = [UIColor colorWithHexString:@"#3b3b3b"];
        [self addSubview:_countLabel];
    }
    
    return self;
}

- (void)setDesTitle:(NSString *)desTitle{
    
    _desTitle = desTitle;
    _desLabel.text = [NSString stringWithFormat:@"%@ :",desTitle];
}

- (void)setCountTitle:(NSString *)countTitle{
    
    _countTitle = countTitle;
    _countLabel.text = [NSString stringWithFormat:@"%@天",countTitle];
}

@end
